// 添加保存型号
function addsaveModel(){
    //获取值
     var modelname = document.getElementById("modelname").value
     var modelfullName = document.getElementById("modelfullname").value
     var modelengine = document.getElementById("modelengine").value
     var modeltransmission = document.getElementById("modeltransmission").value
     var seriesid = document.getElementById("modelseriesid").value
     var dates={
        name:modelname,
        fullName:modelfullName,
        engine:modelengine,
        transmission:modeltransmission,
        seriesID:seriesid
     }
     var datas = JSON.stringify(dates)
     $.ajax({
         url:'http://192.168.0.110:8080/CarManage/addModel',
         method:'post',
         contentType: "application/json",
         data:datas,
         success: function (res) {
             console.log(res.data)
         } 
     })
      // 返回
      divset = document.getElementsByClassName("modelSearch");
      for (var i = 0; i < divset.length; i++) {
          divset[i].style.display = "inline";
          location.reload();
      };
      divsetedit = document.getElementsByClassName("modelEdit");
      for (var i = 0; i < divset.length; i++) {
          divsetedit[i].style.display = "none";
      };
      divsetadd = document.getElementsByClassName("modelAdd");
      for (var i = 0; i < divset.length; i++) {
          divsetadd[i].style.display = "none";
      };
     
}